<div class="am-u-sm-12 widget main-w" >
	<ol class="am-breadcrumb">
		<li><a href="{:url('/admin/index')}">首页</a></li>
		<li><a href="{:url('/admin/car/index')}">业务管理</a></li>
		<li class="am-active">维保管理</li>
	</ol>
	<form class="am-form-inline tpl-form-border-form" action="" method="get">
		<div class="am-u-sm-12 cl-p">
			<div class="am-form-group am-u-sm-3">
				<div class="am-u-sm-12 cl-p po_relative">
					<input type="hidden" class="CarId" name="car_id" value="{$Think.get.car_id}" />
					<input type="text" class="am-form-field tpl-form-no-bg  car_number"  value="{$Think.get.number}" placeholder="点击选择车辆" readonly="">
					<span class="input-group-addon close-input"><i class="am-icon-close"></i></span> 
				</div>
			</div>
			<div class="am-u-sm-3 cl-p" >
				<div class="am-u-sm-12 cl-p">
					<div class="am-u-sm-6 cl-p">
						<div class="am-u-sm-11 cl-p">
							<input type="text" name="start_date" class="am-form-field tpl-form-no-bg start_date"  value="{$Think.get.start_date}" placeholder="维修开始时间" data-am-datepicker="" readonly="">
						</div>
						<div class="am-u-sm-1 cl-p" style="text-align: center;">-</div>
					</div>
					<div class="am-u-sm-6 cl-p">
						<div class="am-u-sm-12 cl-p">
							<input type="text" name="end_date" class="am-form-field tpl-form-no-bg end_date"  value="{$Think.get.end_date}" placeholder="维修结束时间" data-am-datepicker="" readonly="">
						</div>
					</div>
				</div>
				
			</div>
			
			<div class="am-u-sm-6 " >
				<button type="submit" class="am-btn am-btn-sm am-btn-primary am-radius" style="margin-top: -2px;">查询<i class="am-icon-search"></i></button>
			</div>
		</div>
	</form>
	
	<div style="padding: 10px;" class="am-u-sm-12">
		<form class="am-form tpl-form-border-form tpl-form-border-br cl-p cl-m" action="outexcel" method="get">
			<input type="hidden"  name="car_id" value="{$Think.get.car_id}" />
			<input type="hidden" name="start_date" value="{$Think.get.start_date}" >
			<input type="hidden" name="end_date" value="{$Think.get.end_date}" >
		{if $Think.get.filter}
		<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
			<a href="{:url('index')}" class="am-btn am-btn-default">
				</span> 查看可用记录</a>
			<button  class="am-btn am-btn-default am-fr" style="float: right;">导出数据</button>
		</div>
		{else/}
		<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
			<a href="{:url('add')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</a>
			<button type="button" class="am-btn am-btn-default delete-multiple" data-method='deleteMultiple'><span class="am-icon-trash-o"></span> 删除</button>
			<a href="{:url('index')}?filter=delete" class="am-btn am-btn-default">查看已删除记录</a>
			<button  class="am-btn am-btn-default am-fr" style="float: right;">导出数据</button>
		</div>
		{/if}
		</form>
		<table width="100%" class="am-table am-table-compact am-table-bordered am-table-radius am-table-striped am-text-truncate tpl-table-black" id="service">
			<thead>
				<tr>
					<th><input type="checkbox" data-checkall='1' class="check-all"/></th>
					<th>编号</th>
					<th>车牌号</th>
					<th>开始时间</th>
					<th>结束时间</th>
					<th>地点</th>
					<th>送维/送保人</th>
					<th>项目</th>
					<th>提醒</th>
					{if $op == 'search'}
					{else/}
					<th>操作</th>
					{/if} 
				</tr>
			</thead>
			<tbody>
				{foreach $list as $key => $item}
				<tr data-id="{$item.maintenance_record_id}">
					<th><input type="checkbox" class="check-list" /></th>
					<td>{$item.numbers}</td>
					<td><a href="{:url('car/detail',['car_id'=>$item['car_id'] ])}?service=1">{$item.number}</a></td>
					<td>{$item.start_date}</td>
					<td>{$item.end_date}</td>
					<td>{$item.address}</td>
					<td>{$item.leader}</td>
					<td>{$item.service_type==1?'维修':'保养'}</td>
					<td>{$item.remind?:'无提醒信息'}</td>
					{if $op == 'search'}
					{else/}
					<td data-id="{$item.number}">
						<div class="tpl-table-black-operation">
							<a href="{:url('edit',['maintenance_record_id'=>$item.maintenance_record_id])}{if $Think.get.page}?page={$Think.get.page}{else/}?page=1{/if}">
								<i class="am-icon-pencil"></i> 编辑
							</a>
							<a href="javascript:;" class="tpl-table-black-operation-del delete-list" data-method="delete">
								<i class="am-icon-pencil"></i> 删除
							</a>
						</div>
					</td>
					{/if} 
				</tr>
				{/foreach}
				<!-- more data -->
			</tbody>
		</table>
		<div class="am-u-lg-12 am-cf">

			<div class="am-fr">
				{$pager}
			</div>
		</div>
	</div>

</div>